//
//  BHHTTPUrl.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/7/12.
//

import UIKit

class BHHTTPUrl: NSObject {
    static func url(url: String) -> String {
        if url.hasPrefix("http") == true {
            return url
        }else {
            if BHHTTPEnvironment.shared.apiEnvironment == .Realese {
                return "http://t.api.yaodongqilai.com"+url
            }else if BHHTTPEnvironment.shared.apiEnvironment == .Mock{
                return "http://myapi.chinashunhao.cn/mock/145/"+url
            }else if BHHTTPEnvironment.shared.apiEnvironment == .Developer {
                return "http://t.api.yaodongqilai.com/"+url
            }else {
                return "http://192.168.1.123:8080/"+url
            }
        }
    }
}

// MARK: 用户协议和隐私协议
extension String {
    static let userAgreementUrl: String = "http://share.yaodongqilai.com/#/termsService" //用户协议
    static let privateAgreementUrl: String = "http://share.yaodongqilai.com/#/privacy" //隐私协议
}

// MARK: 公共部分
extension String {
    /**公共接口 hot_city热门城市*/
    static let common_get_dic_url: String = "big-health/sys/dict/getDictItems/" // 公共接口
    static let common_attensionOrNot_url: String = "big-health/system/attention/addAttention" //关注/取消关注
    static let common_collect_url: String = "big-health/sys/bhCollection/addCollection" // 收藏|取消收藏

    static let common_report_url: String = "big-health/system/bhAccusation/addAccusation" // 举报
    
    static let common_banner_listUrl: String = "big-health/sys/banner/bannerList" // 获取banner

    // 图片上传
    static let common_upload_url: String = "big-health/sys/common/uploadBatch"
    // 视频上传 || 单个文件上传
    static let common_uploadVideo_url: String = "big-health/sys/common/uploadVideo"
    
    // 列表筛选获取一级分类目录
    static let common_querySortTypeOne_url: String = "big-health/sys/bhMotionType/selectMotions"
    // 列表筛选获取二级分类目录
    static let common_querySortTypeTwo_url: String = "big-health/sys/bhMotionType/selectMotionTypeByPid"
    
    // 根据城市名称查询下属所有区
    static let common_queryCityAllArea_url: String = "big-health/sys/area/regionByCityName"
    
    // 统一下单
    static let common_createOrder_url: String = "big-health/sys/byOrder/createOrder"

}

// MARK: 登录部分
extension String {
    static let logion_get_mobileCode_url: String = "big-health/sys/sms" // 获取验证码
    static let logion_mobileCode_logionUrl: String = "big-health/sys/loginByCaptcha" // 验证码登录
    static let login_refresh_token_url: String = "big-health/sys/refresh" // 刷新token
}


// MARK: 首页部分
extension String {
    static let home_city_listUrl: String = "big-health/sys/area/city" // 获取城市列表
    static let home_province_listUrl: String = "big-health/sys/area/province" // 获取省份列表
    static let home_area_listUrl: String = "big-health/sys/area/region" // 获取城区列表
    static let home_stadium_listUrl: String = "big-health/sys/venue/homeVenueList" // 获取首页场馆列表
    static let home_game_listUrl: String = "big-health/sys/bhEvent/homeEventList" // 获取首页赛事列表
}

// MARK: 场馆部分
extension String {
    static let stadium_detail_Url: String = "big-health/sys/venue/info" // 获取场馆详情
    static let stadium_detail_game_listUrl: String = "big-health/sys/bhEvent/queryByVenueId" // 获取场馆详情内部赛事列表
    static let stadium_detail_coach_listUrl: String = "big-health/sys/bhCoach/venueCoachs" // 获取场馆详情内部教练列表
    static let stadium_detail_product_listUrl: String = "big-health/sys/venueGoods/venueGoods" // 获取场馆详情内部商品列表
    static let stadium_detail_play_listUrl: String = "big-health/sys/bhGoplay/venueGoplay" // 获取场馆详情内部活动列表
    
    static let stadium_detail_coach_detailUrl: String = "big-health/sys/bhCoach/info" // 获取场馆详情教练详情
    static let stadium_detail_product_detailUrl: String = "big-health/sys/venueGoods/info" // 获取场馆详情商品详情
    
    static let stadium_main_listUrl: String = "big-health/sys/venue/venuePage" // 获取场馆列表（包含筛选）


}

// MARK: 赛事部分
extension String {
    static let game_filter_list_url: String = "big-health/sys/bhEvent/eventPage" // 赛事的筛选列表
    static let game_detail_url: String = "big-health/sys/bhEvent/info"
    static let game_detail_applyDes_url: String = "big-health/sys/bhEventSignup/signInfo" // 赛事详情的报名明细
    static let game_detail_applyUserList_url: String = "big-health/sys/bhEventSignup/signUserInfo" // 赛事详情的报名用户列表
    static let game_detail_dyn_url: String = "big-health/sys/eventDynamic/eventDynamics" // 赛事详情的赛时动态
    static let game_detail_report_url: String = "big-health/sys/report/eventReport" // 赛事详情的赛时报道
    static let game_detail_applyAct_url: String = "big-health/sys/bhEventSignup/signup" // 赛事详情的报名接口
    static let game_detail_signIn_url: String = "big-health/sys/bhEventSignup/signin" // 赛事详情的签到接口
    static let game_apply_groupInfo_url: String = "big-health/sys/bhEventTeam/groupInfo" // 赛事报名的组别详情
    

}


// MARK: 圈子部分
extension String {
    static let circle_column_url: String = "big-health/system/bhCircleColumn/queryList" // 获取栏目列表
    static let circle_likeOrNot_url: String = "big-health/system/bhCircleLike/addCircleLike" //点赞/取消点赞
    static let circle_relateColumn_url: String = "big-health/system/bhUserColumn/addUserColumnRelation" // 挑选栏目(用户与栏目关联) 多选
    static let circle_personalColunm_url: String = "big-health/system/bhCircleColumn/myColumnList" // 个人栏目展示
    static let circle_publish_url: String = "big-health/system/bhCircle/addCircle" // 发布圈子
    static let circle_main_list_url: String = "big-health/system/bhCircle/circlePageList" // 圈子列表
    static let circle_detail_url: String = "big-health/system/bhCircle/circleDetail" // 圈子详情
    static let circle_delete_url: String = "big-health/system/bhCircle/deleteCircle" // 删除圈子
    static let circle_reviewDyn_url: String = "big-health/system/bhCircleComment/circleCommentAdd" // 评论动态
    static let circle_replyReview_url: String = "big-health/system/bhCircleComment/reviewerCommentAdd" // 回复评论
    static let circle_review_list_url: String = "big-health/system/bhCircleComment/circleCommentPageList" // 评论列表
    static let circle_review_delete_url: String = "big-health/system/bhCircleComment/deleteCircleComment" // 删除评论
    
    static let circle_publish_relation_url: String = "big-health/system/bhCircle/relationPageList" // 发布圈子的关联列表（场馆、赛事、趣玩）

}

// MARK: 趣玩
extension String {
    static let fun_list_url: String = "big-health/sys/bhGoplay/goplayPageList" // 趣玩分页列表
    static let fun_detail_url: String = "big-health/sys/bhGoplay/queryGoplayDetail" // 趣玩详情
    static let fun_detail_userApply_list_url: String = "big-health/sys/bhGoplay/signPageList" // 趣玩用户报名列表
    static let fun_detail_userApply_url: String = "big-health/sys/bhGoplaySignup/addGoplaySignup" // 报名
    static let fun_publish_relate_url: String = "big-health/system/bhCircle/relationPageList" // 趣玩发布的关联场馆|医疗机构
    static let fun_publish_url: String = "big-health/sys/bhGoplay/addGoplay" // 趣玩发布

  
    
}

//MARK: 个人中心
extension String {
    
    static let me_userInfo_url: String = "big-health/sys/user/homepageData" // 我的/他人主页资料
    static let me_userInfo_edite_url: String = "big-health/sys/user/homepageDataEdit" // 个人资料编辑
    static let me_userInfo_number_url: String = "big-health/sys/user/personalInfo" // 自己/他人信息展示数据(数量)
    
    static let me_userInfo_fans_list_url: String = "big-health/system/attention/fansList" // 用户粉丝列表
    static let me_userInfo_attention_list_url: String = "big-health/system/attention/myAttentionList" // 用户关注列表
    static let me_userInfo_likeCircle_list_url: String = "big-health/system/bhCircle/likeCirclePageList" // 我的/他人的点赞圈子列表
    static let me_userInfo_selfCircle_list_url: String = "big-health/system/bhCircle/userCirclePageList" // 我的/他人的圈子列表
    
    // 趣玩
    static let me_fun_list_url: String = "big-health/sys/bhGoplay/myGoplayPageList" // 我的趣玩分页列表
    static let me_fun_apply_detail_url: String = "big-health/sys/bhGoplay/goplaySignDetailVO" // 我的趣玩报名详情
    static let me_fun_creater_editeDetailInfo_url: String = "big-health/sys/bhGoplay/editGoplay" // 创建者修改趣玩内容
    static let me_fun_applyUser_edite_url: String = "big-health/sys/bhGoplaySignup/editSignup" // 报名用户修改用户报名信息
    static let me_fun_applyUser_quite_url: String = "big-health/sys/bhGoplaySignup/signOutGoplay" // 报名用户退出
    static let me_fun_creater_removeUser_url: String = "big-health/sys/bhGoplaySignup/removeUser" // 创建约玩用户移除报名用户
    static let me_fun_creater_dissolve_url: String = "big-health/sys/bhGoplaySignup/dismissGoplay" // 创建约玩用户解散约玩
    static let me_collection_url: String = "big-health/sys/bhGoplay/myCollectionPageList" // 我的趣玩
    
    // 我的赛事
    static let me_myGameState_url: String = "big-health/sys/bhEventSignup/mySignupCount" // 我的赛事报名状态
    static let me_myGameState_list_url: String = "big-health/sys/bhEventSignup/mySignupPage" // 我的赛事列表
    static let me_myGame_applyDetail_url: String = "big-health/sys/bhEventSignup/signupInfo" // 我的赛事报名详情
    static let me_myGame_dissolveGame_url: String = "big-health/sys/bhEventSignup/dismission" // 我的赛事报名详情-解散赛事
    static let me_myGame_quiteGame_url: String = "big-health/sys/bhEventSignup/quit" // 我的赛事报名详情-退出赛事
    static let myGame_addApplyInfo_url: String = "big-health/system/bhEventSignupInfo/add" // 我的赛事报名详情-添加报名信息
    static let myGame_editeApplyInfo_url: String = "big-health/system/bhEventSignupInfo/edit" // 我的赛事报名详情-修改报名信息

}

// MARK: 运动
extension String {
    static let sport_main_target_list_url: String = "big-health/system/bhCampaign/campaignPageList" // 运动-目标列表
    static let sport_create_target_url: String = "big-health/system/bhCampaign/addCampaign" // 运动-创建打卡内容
    static let sport_edite_target_url: String = "big-health/system/bhCampaign/editCampaign" // 运动-编辑打卡内容
    static let sport_target_detail_url: String = "big-health/system/bhCampaign/campaignDetail" // 运动-打卡详情
    static let sport_planSign_url: String = "big-health/system/bhCampaign/addCampaignRecord" // 运动-打卡

    static let sport_planSign_recordList_url: String = "big-health/system/bhCampaign/campaignRecordPageList" // 运动-打卡记录

    static let sport_create_runOrOther_url: String = "big-health/system/bhCampaign/addRun" // 运动-新增运动/其他运动
    static let sport_runOrOther_record_url: String = "big-health/system/bhCampaign/runPageList" // 运动-新增运动/其他运动记录


}


//MARK: 钱包
extension String {
    static let wallet_alipay_auth_bind_url: String = "big-health/sys/byAccount//initBindAlipay" // 授权信息
    static let wallet_user_account_url: String = "big-health/sys/byAccount/wallet" // 我的钱包
    static let wallet_alipay_bind_url: String = "big-health/sys/byAccount/bindAlipay" // 支付宝授权绑定
    static let wallet_alipay_unBind_url: String = "big-health/sys/byAccount/unbindAlipay" // 支付宝解绑
    static let wallet_user_withDraw_url: String = "big-health/sys/byAccount/cash" // 用户提现
    static let wallet_user_billDetail_url: String = "big-health/sys/byBalanceRecord/accountPage" // 账户明细

}

// MARK: 订单
extension String {
    static let order_myOrder_url: String = "big-health/sys/byOrder/myOrderPage" // 我的订单列表
    static let order_myOrder_detail_url: String = "big-health/sys/byOrder/orderDetail" // 我的订单详情
    static let order_cancel_myOrder_url: String = "big-health/sys/byOrder/cancelOrder" // 取消订单

}

// MARK: 分享
extension String {
    static let share_circleDetail_url: String = "http://share.yaodongqilai.com/#/circleDetail?id=" // 圈子详情的分享
}
